home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Clinton - Portrait of Victory
/
PORTRAIT OF VICTORY.BIN
/
clntpc16
/
eagle.txt
< prev
next >
Wrap
Text File
|
1992-12-30
|
9KB
|
478 lines
ifvideo m okayv
ifvideo 1
video 1
set center on
text 0 20 "Sorry, this program requires a VGA card to run."
text 0 17 "Press <ENTER> to exit."
set center off
endif
ifvideo 2
video 2
set center on
text 0 20 "Sorry, this program requires a VGA card to run."
text 0 17 "Press <ENTER> to exit."
set center off
endif
ifvideo h
video h
set center on
text 0 200 "Sorry, this program requires a VGA card to run."
text 0 170 "Press <ENTER> to exit."
set center off
endif
waitkey
exit
okayv:
ifmem 410000 okaym
video 1
text 8 21 "THERE IS NOT ENOUGH AVAILABLE MEMORY FOR THIS PRESENTATION"
text 8 20 "TO RUN. TO REMEDY THIS, TRY THE FOLLOWING:"
text 8 17 "Reboot your computer with a bootable floppy disk that"
text 8 16 "contains COMMAND.COM to remove any memory resident"
text 8 15 "programs that were installed and try the presentation"
text 8 14 "again. After viewing the presentation, reboot your"
text 8 13 "computer normally to restore your original set-up."
set center on
text 0 10 "Press <ENTER> to quit."
set center off
waitkey
exit
okaym:
video m
;----------------------------------------------------------------------------
;Initialize CD-ROM drive
;----------------------------------------------------------------------------
cdinit
set esc off
set space off
set wrap off
set abort off
pload ebkg 1
palette 1
pfade 9 1
pfree 1
pload etit 1
cfade 9 96 187 p1
pfree 1
cdplay 69 23
timer
lpm2:
if @elapsed<23000
goto lpm2
endif
cdstop
cload ebkgx 1 1
cfade 9 0 68 1
cfree 1
menu1:
cload emtit 1 1
cfade 9 112 107 1
cfree 1
cload ebche 1 1
cfade 9 0 0 1
cfree 1
mn1:
waitkey
getkey k
if @k==1
cload ebkgx 1 1
cfade 9 0 68 1
cfree 1
link eagle1
else
if @k==2
cload ebkgx 1 1
cfade 9 0 68 1
cfree 1
link eagle2
else
if @k==3
cload ebkgx 1 1
cfade 9 0 68 1
cfree 1
link eagle3
else
if @k==chr(104)||@k==chr(72)
goto help
else
if @k==chr(99)||@k==chr(67)
goto credits
else
if @k==chr(101)||@k==chr(69)
cload ebkgx 1 1
cfade 9 0 68 1
cfree 1
pload edexit 1
cfade 9 192 201 p1
pfree 1
menu1b:
waitkey
getkey k
if @k==chr(13)
exit
else
if @k==chr(27)
cload ebkgx 1 1
cfade 9 0 68 1
cfree 1
cload emtit 1 1
cfade 9 112 107 1
cfree 1
goto mn1
else
goto menu1b
endif
endif
else
goto mn1
endif
endif
endif
endif
endif
endif
exit
help:
pload ebkg 1
pfade 9 1
pfree 1
pload edhelp 1
cfade 9 32 74 p1
pfree 1
fload ibm8 1
fgaps 1 4 2
set buf readfile(mainhlp.doc)
window 65 345 575 100
color 1
text @@buf
. farfree(@buf)
window
ffree 1
hlp1:
waitkey
getkey k
if @k==chr(13)
pload ebkg 1
pfade 9 1
pfree 1
goto menu1
else
goto hlp1
endif
credits:
set num 1
pload ebkg 1
pfade 9 1
pfree 1
crd1:
cload etxtx2 1 1
cfade 9 40 90 1
cfree 1
color 1
fload ibm8 1
fgaps 1 4 2
set buf readfile(crds$@num$.doc)
window 60 95 580 400
text @@buf
. farfree(@buf)
window
set center on
ffree 1
fload ibm8 1
text 0 135 "Page "$@num$" of 2"
text 0 125 "Press <PGUP> for next or <PGDN> for prior."
text 0 105 "PRESS <ENTER> TO RETURN TO MENU"
set center off
ffree 1
crd2:
waitkey
getkey k
if @k==chr(13)
pload ebkg 1
pfade 9 1
pfree 1
goto menu1
else
if @k==chr(73)$chr(1)||@k==chr(72)$chr(1)
if @num==2
set num 1
goto crd1
else
set num @num+1
goto crd1
endif
else
if @k==chr(81)$chr(1)||@k==chr(80)$chr(1)
if @num==1
set num 2
goto crd1
else
set num @num-1
goto crd1
endif
else
goto crd2
endif
endif
endif
;
; CDINIT
;
; Check for CD-ROM driver and setup @drive
;
cdinit:
int 0x2f 0x1500,0
if @bx
global drive chr(@cx+asc("A"))
else
global drive ""
endif
return
cdplay:
cdtrack @1 @3 @4 @5
cdcmd 132,@0,@2*75
cdcheck @0,cdplay
return
;
; CDPLAYTO TRACK MINUTES SECONDS FRAMES TRACK MINUTES SECONDS FRAMES
;
;
cdplayto:
cdtrack @1 @2 @3 @4
local begin @0
cdtrack @5 @6 @7 @8
local end @0
cdcmd 132,@begin,@end-@begin
cdcheck @0,cdplayto
return
;
; CDSTOP
;
; Stop playing immediately
;
cdstop:
cdcmd 133,0,0
cdcheck @0,cdstop
return
;
; CDRESUME
;
; Resume playing from where we issued a CDSTOP
;
cdresume:
cdcmd 136,0,0
cdcheck @0,cdresume
return
;
; CDSEEK TRACK {MINUTES SECONDS FRAMES}
;
; Seek the CD player head to a track to minimize play startup time.
; Parameters are the same as CDPLAY.
;
cdseek:
cdtrack @1 @2 @3 @4
cdcmd 131,@0,0
cdcheck @0,cdseek
return
;
; CDEJECT
;
; Open the CD drive's tray/door
;
cdeject:
local buf ofs("1")
local bseg seg(@buf);
poke @bseg @buf 0 ;Eject Disk
cdcmd 12,@buf|(@bseg<<16),1 ;WRITE IOCTL Output
cdcheck @0,cdeject
return
;
; CDCLOSE
;
; Close the CD drive's tray/door
;
cdclose:
local buf ofs("1")
local bseg seg(@buf);
poke @bseg @buf 5 ;Close Tray
cdcmd 12,@buf|(@bseg<<16),1 ;WRITE IOCTL Output
cdcheck @0,cdclose
return
;
; CDSTATUS
;
; Return CD Drive status and setup global variables @first and @last
;
cdstatus:
local buf ofs("123456")
local bseg seg(@buf);
poke @bseg @buf 10 ;Audio Disk Info
cdcmd 3,@buf|(@bseg<<16),6 ;READ IOCTL Input
cdcheck @0,cdstatus
global first peek(@bseg,@buf+1)+0
global last peek(@bseg,@buf+2)+0
poke @bseg @buf 6 ;Device status
cdcmd 3,@buf|(@bseg<<16),5 ;READ IOCTL Input
cdcheck @0,cdstatus
return peekl(@bseg,@buf+1)
;
; CDTRACK TRACK MINUTES SECONDS FRAMES
;
; Return the absolute sector number of a track
;
cdtrack:
local buf ofs("1234567")
local bseg seg(@buf);
poke @bseg @buf 11 ;Get Audio Track Info
poke @bseg @buf+1 @1 ;track number
cdcmd 3,@buf|(@bseg<<16),7 ;READ IOCTL Input
cdcheck @0,cdtrack
return peekl(@bseg,@buf+2)+(@2*60+@3)*75+@4 ;return track address
cdcmd:
local req ofs("12345678901234567890123456")
local rseg seg(@req)
poke @rseg @req 13 ;param length
poke @rseg @req+1 0 ;subunit
poke @rseg @req+2 @1 ;command code
pokew @rseg @req+3 0 ;status
pokel @rseg @req+5 0 0 ;reserved
poke @rseg @req+13 1 ;address mode
pokel @rseg @req+14 @2 ;begin
pokel @rseg @req+18 @3 ;length
pokel @rseg @req+22 0 ;reserved
int 0x2f 0x1510,@req,asc(@drive)-asc("A"),,,,,seg(@req)
if peek(@rseg,@req+4)&0x80
databegin
"Unknown Error"
"Write-protect violation"
"Unknown unit"
"Drive not Ready"
"Unknown command"
"CRC error"
"Bad drive request structure length"
"Seek Error"
"Unknown media"
"Sector not found"
"Printer out of paper"
"Write Fault"
"Read Fault"
"General failure"
"Reserved 1"
"Reserved 2"
"Invalid disk change"
dataend
if peek(@rseg,@req+3)<16
dataskip peek(@rseg,@req+3)+1
endif
return @
else
return ""
endif
cdcheck:
if @1!=""
clearscr 0
fload ibm8 1
color 15
set center on
text 0 200 @2$": "$@1
text 0 180 "Press any key to exit"
set center off
ffree 1
waitkey
exit
endif
return
prtstatus:
if @1&1
text "Door Open"$chr(10)
else
text "Door Closed"$chr(10)
endif
if @1&2
text "Door unlocked"$chr(10)
else
text "Door locked"$chr(10)
endif
if @1&4
text "Supports cooked and raw reading"$chr(10)
else
text "Supports only cooked reading"$chr(10)
endif
if @1&8
text "Read/write"$chr(10)
else
text "Read only"$chr(10)
endif
if @1&16
text "Data read and plays audio/video tracks"$chr(10)
else
text "Data read only"$c